<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>My Project: cFx类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>类</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>变量</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a>  </div>
  <div class="headertitle">
<div class="title">cFx类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>特效类，用于方便使用Shader.  
 <a href="classc_fx.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="c_fx_8h_source.html">cFx.h</a>&gt;</code></p>

<p><a href="classc_fx-members.html">所有成员列表.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a80a80b4f71a9fb9d57c736556f4b87a9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a80a80b4f71a9fb9d57c736556f4b87a9"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>cFx</b> (IDirect3DDevice9 *pDevice)</td></tr>
<tr class="memitem:a4fdc52ce06020c90223150fec77f73aa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4fdc52ce06020c90223150fec77f73aa"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>load_fx</b> (const char *FileName)</td></tr>
<tr class="memitem:a37e38ef03859d9dfd574179339bf578b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a37e38ef03859d9dfd574179339bf578b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>apply</b> (char *TechniqueName, void(*fuc)())</td></tr>
<tr class="memitem:a1b92db871f880d83dfc7f8c47cef3285"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1b92db871f880d83dfc7f8c47cef3285"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classc_fx.html#a1b92db871f880d83dfc7f8c47cef3285">apply</a> (char *TechniqueName, <a class="el" href="classc_terrain.html">cTerrain</a> *pTerrain, void(cTerrain::*fuc)())</td></tr>
<tr class="memdesc:a1b92db871f880d83dfc7f8c47cef3285"><td class="mdescLeft">&#160;</td><td class="mdescRight">(pTerrain-&gt;*成员函数指针)(); 忘了是不是自己发明的。 <br/></td></tr>
<tr class="memitem:aa5d6617367a0821e073485bbcf1c0340"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa5d6617367a0821e073485bbcf1c0340"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classc_fx.html#aa5d6617367a0821e073485bbcf1c0340">apply</a> (char *TechniqueName, <a class="el" href="classc_terrain_v1.html">cTerrainV1</a> *pTerrain, void(cTerrainV1::*fuc)())</td></tr>
<tr class="memdesc:aa5d6617367a0821e073485bbcf1c0340"><td class="mdescLeft">&#160;</td><td class="mdescRight">(pTerrain-&gt;*成员函数指针)(); <br/></td></tr>
<tr class="memitem:a590fb527a8864b727b5aab9de8bf26e5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a590fb527a8864b727b5aab9de8bf26e5"></a>
ID3DXEffect *&#160;</td><td class="memItemRight" valign="bottom"><b>get_effect</b> ()</td></tr>
<tr class="memitem:a226bd1c0d55a4645262059bf15899e37"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a226bd1c0d55a4645262059bf15899e37"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>modify_matrix</b> (char *Name, D3DXMATRIX &amp;t)</td></tr>
<tr class="memitem:a477b8fd03dbf2c96cf56b9aff3de417f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a477b8fd03dbf2c96cf56b9aff3de417f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>modify_float</b> (char *Name, float t)</td></tr>
<tr class="memitem:a87cd0624ea462b33657f4164658e666e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a87cd0624ea462b33657f4164658e666e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>modify_vector</b> (char *Name, D3DXVECTOR4 &amp;v)</td></tr>
<tr class="memitem:a686cf69966f00593d5b833570db651b4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a686cf69966f00593d5b833570db651b4"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>modify_value</b> (char *Name, const void *p, int Size)</td></tr>
<tr class="memitem:a2f32d7c170aab5fdacf41cbfd4a1da58"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2f32d7c170aab5fdacf41cbfd4a1da58"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>set_texture</b> (char *Name, IDirect3DTexture9 *pTexture)</td></tr>
<tr class="memitem:ab25bdc4e2c807858f3a7b7db8788e76c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab25bdc4e2c807858f3a7b7db8788e76c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>set_float4</b> (char *Name, void *p)</td></tr>
<tr class="memitem:a69a93a4969b7e552e0c83105c3adf784"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a69a93a4969b7e552e0c83105c3adf784"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>set_float_array</b> (char *Name, float *p, int num)</td></tr>
<tr class="memitem:adc60df11f900550e9d17fedddfdb450c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adc60df11f900550e9d17fedddfdb450c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>commitChanges</b> ()</td></tr>
<tr class="memitem:a8bc4dcc7742d671bdf7f47880f8e8d89"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classc_fx.html#a8bc4dcc7742d671bdf7f47880f8e8d89">updateShaderMatrix</a> (D3DXMATRIX &amp;World, D3DXMATRIX &amp;View, D3DXMATRIX Proj, char *matWorldName=&quot;g_WorldMatrix&quot;, char *matWorldInverseTransposeName=&quot;g_WorldInverseTransposeMatrix&quot;, char *matWVPName=&quot;g_WorldViewProjMatrix&quot;)</td></tr>
<tr class="memitem:a16a6ebd51be05fe26699b46d79f22696"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a16a6ebd51be05fe26699b46d79f22696"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>updateShaderMaterialLight</b> (D3DXCOLOR &amp;AmbientLight, D3DXCOLOR &amp;AmbientMatrial, D3DXCOLOR &amp;DiffuseLight, D3DXCOLOR &amp;DiffuseMatrial, D3DXCOLOR &amp;SpecLight, D3DXCOLOR &amp;SpecMaterial, float SpecPow, char *AmbientLightName=&quot;g_AmbientLight&quot;, char *AmbientMatrialName=&quot;g_AmbientMaterial&quot;, char *DiffuseLightName=&quot;g_DiffuseLight&quot;, char *DiffuseMatrialName=&quot;g_DiffuseMatrial&quot;, char *SpecLightName=&quot;g_SpecLight&quot;, char *SpecMaterialName=&quot;g_SpecMaterial&quot;, char *SpecPowName=&quot;g_SpecPow&quot;)</td></tr>
<tr class="memitem:a7da7df52a3f6d157103d25c5050326f8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7da7df52a3f6d157103d25c5050326f8"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setShaderMaterial</b> (D3DXCOLOR &amp;AmbientMatrial, D3DXCOLOR &amp;DiffuseMatrial, D3DXCOLOR &amp;SpecMaterial, float SpecPow, char *AmbientMatrialName=&quot;g_AmbientMaterial&quot;, char *DiffuseMatrialName=&quot;g_DiffuseMatrial&quot;, char *SpecMaterialName=&quot;g_SpecMaterial&quot;, char *SpecPowName=&quot;g_SpecPow&quot;)</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:a6f685c7e684093d1165f9201c0689b97"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6f685c7e684093d1165f9201c0689b97"></a>
IDirect3DDevice9 *&#160;</td><td class="memItemRight" valign="bottom"><b>_pDevice</b></td></tr>
<tr class="memitem:a2c8a7d580cd53540433e8915f42e5d9f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c8a7d580cd53540433e8915f42e5d9f"></a>
ID3DXEffect *&#160;</td><td class="memItemRight" valign="bottom"><b>_pEffect</b></td></tr>
<tr class="memitem:a4c0c66f5b8ad2f46c9a957c96c34d032"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4c0c66f5b8ad2f46c9a957c96c34d032"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>_r</b></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>详细描述</h2>
<div class="textblock"><p>特效类，用于方便使用Shader. </p>
<p>需要前导词： class <a class="el" href="classc_terrain.html" title="用三张纹理图，一张混合图，一张高度图，创建地形。">cTerrain</a>; class <a class="el" href="classc_terrain_v1.html" title="创建地形，与cTerrain加载和结构相同，区别是需要cGroundV1。">cTerrainV1</a>; </p>
</div><hr/><h2>成员函数说明</h2>
<a class="anchor" id="a8bc4dcc7742d671bdf7f47880f8e8d89"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void cFx::updateShaderMatrix </td>
          <td>(</td>
          <td class="paramtype">D3DXMATRIX &amp;&#160;</td>
          <td class="paramname"><em>World</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">D3DXMATRIX &amp;&#160;</td>
          <td class="paramname"><em>View</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">D3DXMATRIX&#160;</td>
          <td class="paramname"><em>Proj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>matWorldName</em> = <code>&quot;g_WorldMatrix&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>matWorldInverseTransposeName</em> = <code>&quot;g_WorldInverseTransposeMatrix&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>matWVPName</em> = <code>&quot;g_WorldViewProjMatrix&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section remark"><dt>备注:</dt><dd>如果将shader里的各主要矩阵名固定就能减轻不少负担 世界矩阵变了，其他的都要改 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>E:/!代码工厂/3D引擎/<a class="el" href="c_fx_8h_source.html">cFx.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2012年 五月 27日 星期日 22:27:18 , 为 My Project使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1
</small></address>
</body>
</html>
